package PersonStu.sanqi;

/**
 * @Author: Dijah
 * @Date: 2022/12/13 14:26
 * @Desc:  最大公约数
 *
 */
public class code_16_GCD {

    public static int gcd(int m , int n){
        int result = 0;
        while (n != 0) {
            result = m % n;
            m = n;
            n = result;
        }
        return m;

    }

    public static void main(String[] args) {
        int m = 33;
        int n = 44;
        int gcd = gcd(m, n);
        System.out.println(gcd);
    }
}
